/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

import javax.faces.context.FacesContext;

/**
 *
 * @author amkreuz
 */
public class FarmBean {
    
    private String email,password,response;
    private boolean isAdmin;
    private boolean signedIn;
    private PropertyBean currentProperty;

    public boolean isSignedIn() {
        return signedIn;
    }

    public String getResponse() {
        String result = ((FarmBean) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("user")).response;
        if (result == null)
            result = "No Property Selected";
        return result;
    }

    public PropertyBean getCurrentProperty() {
        return currentProperty;
    }

    public void setCurrentProperty(PropertyBean currentProperty) {
        this.currentProperty = currentProperty;
    }

    
    
    public void setReponse(String reponse) {
        this.response = reponse;
    }

    public void setSignedIn(boolean signedIn) {
        this.signedIn = signedIn;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public boolean isIsAdmin() {
        return isAdmin;
    }

    public void setIsAdmin(boolean isAdmin) {
        this.isAdmin = isAdmin;
    }
}
